package com.patterns.demo.decorator;

/**
 * Author: SamGroves
 * <p>
 * Description: 装饰类
 * <p>
 * Date: 2017/11/29
 */
public class Decorator implements Sourceable {

    private Source source;

    public Decorator(Source source) {
        super();
        this.source = source;
    }

    @Override
    public void method() {
        System.out.println("before decorator");
        source.method();
        System.out.println("after decorator");
    }
}
